home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / MPW_C / ARC_SGML / SGMLH / SYNXTRN.H < prev    next >
Text File  |  1991-08-15  |  8KB  |  160 lines

  1. /******************************************************************************/
  2. /* Added PCBEAL for LINK and data attribute specification list endings. */
  3. /******************************************************************************/
  4. /* SYNXTRN.H: External declarations for concrete syntax constants.
  5. */
  6. /******************************************************************************/
  7. /* Short References
  8. */
  9. #define SRCT    32            /* Number of short reference delimiters. */
  10. #define SRMAXLEN 3            /* Maximum length of a SHORTREF delimiter. */
  11. #define SRNPRT   8            /* Number of non-printable SHORTREF delimiters. */
  12. /******************************************************************************/
  13. struct srdel {
  14.      struct map dtb[SRCT+2];  /* LEXCNM: Short reference delimiters. */
  15.      UNCH *pdtb[SRNPRT+1];    /* LEXCNM: Printable form of unprintable SRs. */
  16.      int fce;                 /* LEXCNM: Index of first FCE in srdeltab. */
  17.      int hyp2;                /* LEXCNM: Index of "two hyphens" in srdeltab. */
  18.      int data;                /* LEXCNM: Index of first SR with data char. */
  19.      int hyp;                 /* LEXCNM: Index of hyphen in srdeltab. */
  20.      int prtmin;              /* LEXCNM: Index of 1st printable SR. */
  21.      int spc;                 /* LEXCNM: Index of space in srdeltab. */
  22. };
  23. struct delim {
  24.      UNCH genre;              /* LEXCON: Generated RE; cannot be markup. */
  25.      UNCH lit;                /* LEXMARK: Char used as LIT delimiter.*/
  26.      UNCH lita;               /* LEXMARK: Char used as LITA delimiter.*/
  27.      UNCH mdc;                /* LEXLMS: Char used as MDC delimiter.*/
  28.      UNCH msc;                /* LEXCON: Char used as MSC delimiter. */
  29.      UNCH net;                /* LEXCON: Char used as NET when enabled.*/
  30.      UNCH pero;               /* LEXMARK: Char used as PERO delimiter. */
  31.      UNCH pic;                /* LEXCON: Char used as PIC delimiter.*/
  32.      UNCH tago;               /* LEXCON: Char used as TAGO when enabled.*/
  33. };
  34. struct lexcode {
  35.      UNCH fce;                /* LEXCNM: FRE character as entity reference. */
  36.      UNCH fre;                /* LEXCON: Free character not an entity ref. */
  37.      UNCH litc;               /* LEXLMS: Literal close delimiter enabled. */
  38.      UNCH lmnsc;              /* LEXLMS: Non-SGML character prefix. */
  39.      UNCH msc;                /* LEXLMS: Marked section close delim enabled. */
  40.      UNCH net;                /* LEXCON: Null end-tag delimiter enabled. */
  41.      UNCH nonet;              /* LEXCON: NET disabled; still used as ETI. */
  42.      UNCH spcr;               /* LEXCNM: Space in use as SHORTREF delimiter. */
  43.      UNCH tago;               /* LEXCON: Tag open delimiter enabled. */
  44.      UNCH cde;                /* LEXLMS: CDATA/SDATA delimiters. */
  45. };
  46. struct lexical {
  47.      struct markup m;         /* Markup strings for text processor. */
  48.      struct srdel s;          /* Short reference delimiters. */
  49.      struct delim d;          /* General delimiter characters. */
  50.      struct lexcode l;        /* Lexical table code assignments. */
  51. };
  52. extern struct lexical lex;    /* Delimiter set constants. */
  53. /******************************************************************************/
  54. extern UNCH lexcnm[];         /* Lexical table: mixed content. */
  55. extern UNCH lexcon[];         /* Lexical table for content (except mixed). */
  56. extern UNCH lexgrp[];         /* Lexical table for groups. */
  57. extern UNCH lexlms[];         /* Lexical table: literals and marked sections. */
  58. extern UNCH lexmark[];        /* Lexical table for markup. */
  59. extern UNCH lextran[];        /* Case translation table for SGML names. */
  60. extern UNCH lextoke[];        /* Lexical table for tokenization. */
  61. /******************************************************************************/
  62. extern struct parse pcbconc;  /* PCB: character data. */
  63. extern struct parse pcbcone;  /* PCB: element content (no data allowed). */
  64. extern struct parse pcbconm;  /* PCB: mixed content (data allowed). */
  65. extern struct parse pcbconr;  /* PCB: replaceable character data. */
  66. extern struct parse pcbetag;  /* PCB: end-tags. */
  67. extern struct parse pcbgrcm;  /* PCB: content model group. */
  68. extern struct parse pcbgrcs;  /* PCB: content model suffix. */
  69. extern struct parse pcbgrnm;  /* PCB: name group. */
  70. extern struct parse pcbgrnt;  /* PCB: name token group. */
  71. extern struct parse pcblitc;  /* PCB: literal with CDATA. */
  72. extern struct parse pcblitp;  /* PCB: literal with CDATA, parm & char refs. */
  73. extern struct parse pcblitr;  /* PCB: attribute value with general refs. */
  74. extern struct parse pcblitv;  /* PCB: literal with CDATA, function char trans.*/
  75. extern struct parse pcbmd;    /* PCB: markup declaration. */
  76. extern struct parse pcbmdc;   /* PCB: comment declaration. */
  77. extern struct parse pcbmdi;   /* PCB: markup declaration (ignored). */
  78. extern struct parse pcbmds;   /* PCB: markup declaration subset. */
  79. extern struct parse pcbmsc;   /* PCB: marked section in CDATA mode. */
  80. extern struct parse pcbmsi;   /* PCB: marked section in IGNORE mode. */
  81. extern struct parse pcbmsrc;  /* PCB: marked section in RCDATA mode. */
  82. extern struct parse pcbpro;   /* PCB: prolog. */
  83. extern struct parse pcbref;   /* PCB: reference. */
  84. extern struct parse pcbstag;  /* PCB: start-tag. */
  85. extern struct parse pcbval;   /* PCB: attribute value. */
  86. extern struct parse pcbeal;   /* PCB: end of attribute list. */
  87. /******************************************************************************/
  88. extern int pcbcnda;           /* PCBCONM: data in buffer. */
  89. extern int pcbcnet;           /* PCBCONM: markup found or data buffer flushed.*/
  90. extern int pcbmdtk;           /* PCBMD: token expected. */
  91. extern int pcbstan;           /* PCBSTAG: attribute name expected. */
  92. /******************************************************************************/
  93. struct keywords {
  94.      UNCH any      [NAMELEN+1];
  95.      UNCH attlist  [NAMELEN+1];
  96.      UNCH capacity [NAMELEN+1];
  97.      UNCH cdata    [NAMELEN+1];
  98.      UNCH charset  [NAMELEN+1];
  99.      UNCH conref   [NAMELEN+1];
  100.      UNCH current  [NAMELEN+1];
  101.      UNCH kdefault [NAMELEN+1];
  102.      UNCH doctype  [NAMELEN+1];
  103.      UNCH document [NAMELEN+1];
  104.      UNCH dtd      [NAMELEN+1];
  105.      UNCH element  [NAMELEN+1];
  106.      UNCH elements [NAMELEN+1];
  107.      UNCH empty    [NAMELEN+1];
  108.      UNCH endtag   [NAMELEN+1];
  109.      UNCH entities [NAMELEN+1];
  110.      UNCH entitee  [NAMELEN+1];
  111.      UNCH fixed    [NAMELEN+1];
  112.      UNCH idiot    [NAMELEN+1];
  113.      UNCH idref    [NAMELEN+1];
  114.      UNCH idrefs   [NAMELEN+1];
  115.      UNCH ignore   [NAMELEN+1];
  116.      UNCH implied  [NAMELEN+1];
  117.      UNCH include  [NAMELEN+1];
  118.      UNCH link     [NAMELEN+1];
  119.      UNCH linktype [NAMELEN+1];
  120.      UNCH lpd      [NAMELEN+1];
  121.      UNCH md       [NAMELEN+1];
  122.      UNCH ms       [NAMELEN+1];
  123.      UNCH name     [NAMELEN+1];
  124.      UNCH names    [NAMELEN+1];
  125.      UNCH ndata    [NAMELEN+1];
  126.      UNCH nmtoken  [NAMELEN+1];
  127.      UNCH nmtokens [NAMELEN+1];
  128.      UNCH nonsgml  [NAMELEN+1];
  129.      UNCH notation [NAMELEN+1];
  130.      UNCH number   [NAMELEN+1];
  131.      UNCH numbers  [NAMELEN+1];
  132.      UNCH nutoken  [NAMELEN+1];
  133.      UNCH nutokens [NAMELEN+1];
  134.      UNCH pcdata   [NAMELEN+1];
  135.      UNCH pi       [NAMELEN+1];
  136.      UNCH public   [NAMELEN+1];
  137.      UNCH rcdata   [NAMELEN+1];
  138.      UNCH re       [NAMELEN+1];
  139.      UNCH required [NAMELEN+1];
  140.      UNCH rs       [NAMELEN+1];
  141.      UNCH sdata    [NAMELEN+1];
  142.      UNCH sgml     [NAMELEN+1];
  143.      UNCH shortref [NAMELEN+1];
  144.      UNCH space    [NAMELEN+1];
  145.      UNCH starttag [NAMELEN+1];
  146.      UNCH subdoc   [NAMELEN+1];
  147.      UNCH syntax   [NAMELEN+1];
  148.      UNCH system   [NAMELEN+1];
  149.      UNCH tab      [NAMELEN+1];
  150.      UNCH temp     [NAMELEN+1];
  151.      UNCH text     [NAMELEN+1];
  152.      UNCH uselink  [NAMELEN+1];
  153.      UNCH usemap   [NAMELEN+1];
  154. };
  155. struct sintax {
  156.      struct keywords k;
  157. };
  158. extern struct sintax syn;     /* Reserved names, concrete syntax constants. */
  159. /******************************************************************************/
  160.